<?php $this->load->library('cart') ?>
<script type="text/javascript">
	$(document).ready(function(){
		$("#cart a.empty").click(function(){
			$id = $(this).attr("name");
			if(confirm("Are you sure?")){
			$.ajax({
				"url"   : "<?php echo base_url(); ?>home/cart/del",
				"type"  : "post",
				"data"  : "id="+$id,
				"async" : false,
				success : function(result){
					$("#cart").load("<?php echo base_url(); ?>home/cart");
				}
			});
			}
		});
	});
</script>
<div id="cart">
<div class="module with-header mod-rounded first">
  <div class="header-1">
    <div class="header-2">
      <div class="header-3"></div>
    </div>
  </div>
  <h4 class="header"><span class="color">Your tickets</span></h4>
  <div class="box-t1">
    <div class="box-t2">
      <div class="box-t3"></div>
    </div>
  </div>
  <div class="box-1">
    <div class="box-2">
      <div class="box-3 deepest"> <span id="resultMessage">
        <ul>
        <?php
		if($this->cart->total_items()){
			$i=1;
			foreach($this->cart->contents() as $item){
				echo "<li><a href='javascript:void(0)'>".$item['options']['start']." <b>".$item['options']['from']."</b> - ".$item['options']['end']." - <b>".$item['options']['to']."</b> ($".$item['price'].")</a>
					<span class='booking'><a href='javascript:void(0)' title='Delete' class='empty' name='".$item['id']."'>Delete</a></span>
				</li>";
				$i++;
			}
		}
		?>
        </ul>
        </span>
        <p class="readmore"><a class="readmore" href="<?php echo base_url(); ?>checkout/bookinginfo">Check Out</a></p>
      </div>
    </div>
  </div>
  <div class="box-b1">
    <div class="box-b2">
      <div class="box-b3"> </div>
    </div>
  </div>
</div>
</div>